<template>
  <div class="indexPage ">
    <!-- web -->
    <el-row class="hidden-xs-only">
      <PCindex ref="PcIndexRef" />
    </el-row>
    <!-- mobile -->
    <el-row class="hidden-sm-and-up">
      <MobileIndex ref="MobileIndexRef" />
    </el-row>
  </div>
  <div class="selectedEffect disableUser" ref="effect">
    
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { LogoUrl, GameBrand } from '@/config/eunm'
import { selectToLabel,getOperatorInfo } from '@/utils/index'
import GM from "@/assets/icon/yanshi_com_logo8.png"
import PCindex from './PCindex.vue'
import MobileIndex from './MobileIndex.vue'

const PcIndexRef = ref<any>()
const MobileIndexRef = ref<any>()
const effect = ref<any>()

onMounted(() => {
  PcIndexRef.value.FirstMeth()
  MobileIndexRef.value.FirstMeth()
  // effect.value.style.display = 'block'
  if(selectToLabel(LogoUrl,getOperatorInfo(location.hostname),'remark','value') != 'OMG'){
    GameBrand.splice(2,1,{ label: 'GM', value:'GM' ,icon: GM, show: true })
  }
  if(getUrlParameter() == 'ICON' || getUrlParameter() == 'icon'){
    window.location.href = 'https://drive.google.com/drive/u/2/folders/16x6-bDJVvVj3dVGZ9DquRmqnKLn0KAPS';
  }
})

// 获取路径上的参数
const getUrlParameter = ()=> {
  let Request = new Object();
  Request = GetRequest();
  return Request;
}
const GetRequest =()=> {
  var url = window.location.href; //获取url中"?"符后的字串
  var theRequest = '';
  if (url.indexOf('?') != -1) {
    let str = url.substr(0);
    let strss = str.split('?');
    theRequest = strss[1];
  }
  return theRequest;
}

</script>

<style scoped lang="scss">
// 蒙层效果
.selectedEffect {
  width: 100%;
  height: 100%;
  background-color: rgba(33, 37, 41, 0.8);
  overflow: hidden;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
  display: none;
  pointer-events: none;
}
</style>